package 一致性组合模式;

public class Person extends Component {

	 protected String name;
	 public Person(String name)
	 {
	    	this.name=name;
	 }
     @Override
      public String showRelationship() {
	        return "成员"+name+" ";
	 }
	@Override
	public void add(Component C) {
		throw new UnsupportedOperationException("This operation is not supported!");
	}

	@Override
	public void remove(String str) {
		throw new UnsupportedOperationException("This operation is not supported!");
	}

}
